﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace EpiPoker.DataAccess
{
    /// <summary>
    /// Stored Procedures for T_PortofolioStatus Table
    /// </summary>
    public class PortfolioStatus
    {
        #region GetFromDBB

        /// <summary>
        /// Get a certain Portfolio
        /// </summary>
        /// <param name="id">Portfolio id</param>
        /// <returns>Portfolio object if goes well, else null</returns>
        public static T_PortfolioStatus GetPortfolioStatusByStatus(string status)
        {
            try
            {
                fbPokerEntities bdd = new fbPokerEntities();
                return bdd.T_PortfolioStatus.Where(x => x.Status == status).FirstOrDefault();
            }
            catch (Exception ex)
            {
                return null;
            }
        }
        #endregion
    }
}